//
// Copyright (c) Microsoft Corporation.  All rights reserved.
//
//
// Use of this source code is subject to the terms of the Microsoft end-user
// license agreement (EULA) under which you licensed this SOFTWARE PRODUCT.
// If you did not accept the terms of the EULA, you are not authorized to use
// this source code. For a copy of the EULA, please see the LICENSE.RTF on your
// install media.
//
#ifndef __ARGS_H
#define __ARGS_H

//------------------------------------------------------------------------------
//
// File:        args.h
//
// Description: This header file defines device structures and constant related
//              to boot configuration. BOOT_CFG structure defines layout of
//              persistent device information. It is used to control boot
//              process. BSP_ARGS structure defines information passed from
//              boot loader to kernel HAL/OAL. Each structure has version
//              field which should be updated each time when structure layout
//              change.
//
//------------------------------------------------------------------------------

#include "oal_args.h"
#include "oal_kitl.h"

#define OAL_ARGS_QUERY_UPDATEMODE   5
#define OAL_ARGS_QUERY_BOOTFLAG    (BSP_ARGS_QUERY + 0)

#define EDBG_CPU_ARM926 (EDBG_CPU_TYPE_ARM | 1)
#define CONFIG_SIGNATURE                    0x12345678
#define CONFIG_AUTOBOOT_DEFAULT_COUNT       5
#define CONFIG_FLAGS_AUTOBOOT               (1 << 0)
#define CONFIG_FLAGS_DHCP                   (1 << 1)
#define CONFIG_FLAGS_SAVETOFLASH            (1 << 2)

//------------------------------------------------------------------------------

#define BSP_ARGS_VERSION    1

#define BSP_SCREEN_SIGNATURE 0xde12de34
typedef struct
{
    ULONG  Signature;           // Config signature (used to validate).
    USHORT VerMajor;            // Config major version.
    USHORT VerMinor;            // Config minor version.
    ULONG  ConfigFlags;         // General bootloader flags.
    ULONG  IPAddr;              // Device static IP address.
    ULONG  CleanBoot;           // clean boot mode flags:0 is nomal other is clean mode.
    ULONG  fUpdateMode;         // Is the device in update mode?
    ULONG  SubnetMask;          // Device subnet mask.
    BYTE   BootDelay;           // Bootloader count-down delay.
    BYTE   LoadDeviceOrder;     // Search order for download devices.
    USHORT USBRNDISMAC[3];      // Crystal USB-RNDIS MAC address.
    ULONG  LaunchAddress;       // Kernel region launch address.
    ULONG  ModemFlag;            //modem adjust flag 
} BOOT_CFG, *PBOOT_CFG;

typedef struct {
    OAL_ARGS_HEADER header;
    UINT8 deviceId[16];                 // Device identification
    OAL_KITL_ARGS kitl;
    ULONG  fUpdateMode;                 // Is the device in update mode?
    ULONG  CleanBoot;                   // clean boot mode flags:0 is nomal other is clean mode.
    UINT8  OemUuid[8];             // 64bit uuid in hardware 
} BSP_ARGS;

typedef struct
{
	UINT8 ucUpdateMode;
	UINT8 ucCleanBoot;
	UINT8 ucRev1;
	UINT8 ucRev2;
}BOOT_FLAG, PBOOT_FLAG;


//------------------------------------------------------------------------------

#endif
